#include <iostream>
#include <map>
#include <string>

using namespace std;

#define ENUM_BEG(E)\
	enum class E : size_t

#define ENUM_END(E) ;\
	ostream& operator<<(ostream&os, const E& e)\
	{\
		return os << (size_t)e;\
	}


ENUM_BEG(E)
{
	a = 10,
	b,
}
ENUM_END(E)

enum 
{
	//A = "a",
};

struct Test
{
	typedef enum
	{
		A	= 0x00000001,		//
		B	= 0x00000002,		//
		C	= 0x00000004,		//
	} Ty;
};

template<typename Context, size_t TestTy>
void func2()
{
	cout << TestTy << endl;
}

int main()
{
	func2<int, Test::A | Test::B | Test::C>();

	return 0;
}